package com.vivien.example.springbootdemo.exception;

public abstract class BaseException extends RuntimeException {
    private final int errorCode; // 错误码
    private final String errorMessage; // 错误信息

    public BaseException(int errorCode, String errorMessage) {
        super(errorMessage);
        this.errorCode = errorCode;
        this.errorMessage = errorMessage;
    }
    public int getErrorCode() {
        return errorCode;
    }
    public String getErrorMessage() {
        return errorMessage;
    }
}